<% extends 'base.html' %>
<% block title %>扫码送货失败<% endblock %>
<% block body %>
<% set picking = _pool.get('stock.picking').get_picking_by_show(picking_id) %>
<% set message = _pool.get('stock.picking').get_picking_message_by_show(picking_id, user_id) %>
<div class='page'>
    <div class="content" ms-controller='delivery-error' >
        <input name='hidden' id='hidden_user' value='${user_id}' ms-visible='false' />
        <input name='hidden' id='hidden_picking' value='${picking_id}' ms-visible='false' />
        <div class='card delivery-picking-show'>
            <div class='weixin-flex delivery-picking-header row'>
                <div class='picking-col-90'>
                    <div class='delivery-picking-header-title'>
                        <span>${picking.name}</span>
                        <span>${picking.delivery_user}</span>
                    </div>

                    <div class='delivery-picking-header-content'>${picking.address}</div>
                </div>
                <div class='delivery-picking-header-icon col-10'>
                    <span class='icon icon-left' ms-visible='!is_display_detail' ms-click='display_detail(${picking_id})'></span>
                    <span class='icon icon-down' ms-visible='is_display_detail'  ms-click='display_detail(${picking_id})'></span>
                </div>
            </div>

            <div class='delivery-picking-detail' ms-visible='is_display_detail'>
                <ul>
                    <li ms-repeat='lines'>
                        <div class='weixin-flex delivery-picking-detail-line row'>
                            <img class='col-20' ms-attr-src='/website/image/product.product/{{el.product_id}}/image' />
                            <div class='col-60' ><span>{{el.product_name}}</span></div>
                            <div class='col-20 pull-right' >X<span>{{el.product_qty}}</span></div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>

        <div class='card delivery-picking-message'>
            ${message | safe}
        </div>
    </div>
</div>

<% endblock %>

<% block script %>
    ${ super() }
    <script type="text/javascript" src="/dftg_weixin/static/src/js/delivery_error.js"></script>
<% endblock %>
